<template>
  <ul class="news-list">
    <li>编号：{{query.id}}</li>
    <li>标题：{{query.title}}</li>
    <li>内容：{{query.content}}</li>
  </ul>
</template>

<script setup lang="ts" name="Detail">
import {useRoute} from "vue-router"
import {toRefs} from 'vue'

let route = useRoute()
// 响应式对象 解构赋值需要保持 响应状态 toRefs
let {query} = toRefs(route)
console.log("#",route)

</script>

<style scoped>
.news-list {
  list-style: none;
  padding-left: 20px;
}

.news-list>li {
  line-height: 30px;
}
</style>